﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CCWin;
using HuanQiuCrm.Properties;
using WChat;
namespace HuanQiuCrm {
    public partial class SensitiveMenage :Skin_Color {
        Settings st = new Settings();
        public SensitiveMenage() {
            InitializeComponent();
        }

        private void SensitiveMenage_Load( object sender, EventArgs e ) {
           try {
                String strConn = "Data Source=bds249611391.my3w.com;Initial Catalog=bds249611391_db;Persist Security Info=True;User ID=bds249611391;Password=hq312453";
                SqlConnection conn = new SqlConnection(strConn);
                String sql = "select * from " + "Sensitive_"+st.Admin ;
                conn.Open();
                SqlCommand cmd = new SqlCommand(sql, conn);
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                DataSet ds = new DataSet();
                da.Fill(ds, "敏感词");

                dgv_sensitive.DataSource = ds;
                dgv_sensitive.DataMember = "敏感词";
                conn.Close();

                dgv_sensitive.Columns[0].HeaderText = "序号";
                dgv_sensitive.Columns[1].HeaderText = "添加人";
                dgv_sensitive.Columns[1].Width = 120;
                dgv_sensitive.Columns[2].HeaderText = "添加时间";
                dgv_sensitive.Columns[2].Width = 150;
                dgv_sensitive.Columns[3].HeaderText = "敏感词";
                dgv_sensitive.Columns[3].Width = 147;
            }
            catch {
            }
        }

        private void btn_ok_Click( object sender, EventArgs e ) {
          this.Close();
        }
    }
}
